<input type="{if $field['type'] == "int"}number{else}text{/if}" name="{$field['name']}" id="input_{$field['name']}" class="form-control{if $field['type'] == "color"} color-picker{/if}" value="{$field['value']}"{if $field['type'] == "email"} pattern="[A-Za-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{literal}{2,6}{/literal}$"{elseif $field['type'] == "int" OR $field['type'] == "integer"} pattern="^[ 0-9]+$"{/if}{if isset($field['maxlength']) && $field['maxlength'] != 0} maxlength="{$field['maxlength']}"{/if} spellcheck>